<?php
// +---------------------------------------------------------------------------+
// | This file is part of the KnowledgebasePublisher package                   |
// | KnowledgebasePublisher - web based knowledgebase publisher tool           |
// |                                                                           |
// | Author:  Evgeny Leontev <eleontev@gmail.com>                              |
// | Copyright (c) 2005 Evgeny Leontev                                         |
// |                                                                           |
// | For the full copyright and license information, please view the LICENSE   |
// | file that was distributed with this source code.                          |
// +---------------------------------------------------------------------------+

class KBGlossary extends AppObj
{
	
	var $properties = array('id'		 	=> NULL,
							'phrase' 		=> '',
							'definition'	=> '',
							'display_once'  => 0
							);
	
	
	var $hidden = array('id');
	
	
	
	function validate($values) {
		
		require_once 'eleontev/Validator.php';
		
		$required = array('phrase', 'definition');
		
		$v =& new Validator($values, false);

		// check for required first, return errors
		$v->required('required_msg', $required);
		
		//$this->js     = &$v->getJscript();
		$this->errors = &$v->getErrors();
		return $this->errors;
	}
	
}
?>